package com.dhgate.spu.analysis.dao;
/** 
 * @author:      wangguodong 
 * @create:      2014-2-13 下午1:36:48 
 * @description: 
 */
public class ConnectionPoolAbs {

//	public Logger logger = Logger.getLogger(ConnectionPoolAbs.class);

	public String jdbcDriver = null; // 数据库驱动

	public String dbUrl = null; // 数据 URL

	public String dbUsername = null; // 数据库用户名

	public String dbPassword = null; // 数据库用户密码

	public String testTable = "dual"; // 测试连接是否可用的测试表名，默认没有测试表

	public int waittime = 1000; // 没有连接的等待时间

	public int initialConnections = 2; // 连接池的初始大小

	public int incrementalConnections = 5;// 连接池自动增加的大小

	public int maxConnections = 40; // 连接池最大的大小

	// 它中存放的对象为 PooledConnection 型

	/**
	 * 
	 * 构造函数
	 * 
	 * 
	 * 
	 * @param jdbcDriver
	 *            String JDBC 驱动类串
	 * 
	 * @param dbUrl
	 *            String 数据库 URL
	 * 
	 * @param dbUsername
	 *            String 连接数据库用户名
	 * 
	 * @param dbPassword
	 *            String 连接数据库用户的密码
	 * 
	 * 
	 * 
	 */

	public ConnectionPoolAbs(String jdbcDriver, String dbUrl, String dbUsername,
			String dbPassword,int initialConnections,int incrementalConnections,int maxConnections,int waittime) {

		this.jdbcDriver = jdbcDriver;

		this.dbUrl = dbUrl;

		this.dbUsername = dbUsername;

		this.dbPassword = dbPassword;

		this.initialConnections = initialConnections;

		this.incrementalConnections = incrementalConnections;

		this.maxConnections = maxConnections;
			
		this.waittime = waittime;
	}
	public ConnectionPoolAbs(){
		
	}
	public ConnectionPoolAbs(ConnectionPoolAbs conAbs) {
		this.jdbcDriver = conAbs.jdbcDriver;

		this.dbUrl = conAbs.dbUrl;

		this.dbUsername = conAbs.dbUsername;

		this.dbPassword = conAbs.dbPassword;

		this.initialConnections = conAbs.initialConnections;

		this.incrementalConnections = conAbs.incrementalConnections;

		this.maxConnections = conAbs.maxConnections;
			
		this.waittime = conAbs.waittime;
	}

	public String getJdbcDriver() {
		return jdbcDriver;
	}

	public void setJdbcDriver(String jdbcDriver) {
		this.jdbcDriver = jdbcDriver;
	}

	public String getDbUrl() {
		return dbUrl;
	}

	public void setDbUrl(String dbUrl) {
		this.dbUrl = dbUrl;
	}

	public String getDbUsername() {
		return dbUsername;
	}

	public void setDbUsername(String dbUsername) {
		this.dbUsername = dbUsername;
	}

	public String getDbPassword() {
		return dbPassword;
	}

	public void setDbPassword(String dbPassword) {
		this.dbPassword = dbPassword;
	}

	public String getTestTable() {
		return testTable;
	}

	public void setTestTable(String testTable) {
		this.testTable = testTable;
	}

	public int getWaittime() {
		return waittime;
	}

	public void setWaittime(int waittime) {
		this.waittime = waittime;
	}

	public int getInitialConnections() {
		return initialConnections;
	}

	public void setInitialConnections(int initialConnections) {
		this.initialConnections = initialConnections;
	}

	public int getIncrementalConnections() {
		return incrementalConnections;
	}

	public void setIncrementalConnections(int incrementalConnections) {
		this.incrementalConnections = incrementalConnections;
	}

	public int getMaxConnections() {
		return maxConnections;
	}

	public void setMaxConnections(int maxConnections) {
		this.maxConnections = maxConnections;
	}


}
